package cn.ulc.socket.weapp.controller;

import cn.hutool.log.Log;
import cn.hutool.log.LogFactory;
import cn.ulc.common.util.Result;
import cn.ulc.socket.weapp.service.SiteServ;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/wechat/site")
public class SiteController {
    private static final Log log = LogFactory.get();

    @Autowired
    SiteServ siteServ;

    @GetMapping("/")
    public Result findList(){
        return Result.success(siteServ.findList());
    }
    @GetMapping("/findRegionList/{siteId}")
    public Result findRegionList(@PathVariable("siteId") Long siteId){
        return Result.success(siteServ.findRegionList(siteId));
    }
}
